#pragma once
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include "../BOGenetyk/DataStructure.h"
#include <stdlib.h>
#include <time.h>
#include <map>

class Generator
{
public:
	Generator(int length, int temperature, int offset);
	Generator(char* filename, int temperature, int offset);
	~Generator(void);
	void CreateInstance(std::string outputFile);

private:
	//procent szans na ubytek w lancuchu
	static const int ERROR = 0;
	//static const int NUCLEO_ENERGY = 12;
	static const int AT_ENERGY = 1;
	static const int GC_ENERGY = 3;
	std::string first;
	int temperatureBase;
	int temperatureOffset;
	std::vector<NUCLEOTIDE> nucleotide;
	int GetBindingEnergy(const std::vector<NUCLEOTIDE>& nucleos);
	int GetBindingEnergy(const NUCLEOTIDE& nucleo);
	std::map<std::string, int> grid;
	void GenerateGrid();
	std::string GetKey(std::vector<NUCLEOTIDE> *nucleo);
	void PrintNucleo(std::ofstream *out, std::string key);
};

